/**
  ******************************************************************************
  * @file           : util.h
  * @version        : v0.1
  * @brief          : Header for util.c file.
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __UTIL_H__
#define __UTIL_H__

#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
#include <stdlib.h>

/* Private includes ----------------------------------------------------------*/


/* Exported types ------------------------------------------------------------*/


/* Exported constants --------------------------------------------------------*/


/* Exported macro ------------------------------------------------------------*/
#ifndef MIN
#define MIN(A, B)    ((A)<(B)?(A):(B))
#endif
/* Exported functions prototypes ---------------------------------------------*/
int uni2utf8(wchar_t chr, uint8_t *buf);
wchar_t *str2wstr(wchar_t *buf, const char *charArr);
int wstrncmp(wchar_t *s1, wchar_t *s2, int n);
wchar_t *wstrcpy(wchar_t *dest, const wchar_t *src);
wchar_t *wtoUpper(wchar_t *s);
wchar_t *getPathExtName(wchar_t *buf, wchar_t *path);

/* Private defines -----------------------------------------------------------*/


#ifdef __cplusplus
}
#endif

#endif /* __UTIL_H__ */
